<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
    <meta name="description" content="gym-management-system"/>
    <meta name="author" content="ZhangMing"/>
    <title>健身房管理系统-会员登录</title>
    <link href="/static/css/styles.css" th:href="@{css/styles.css}" rel="stylesheet"/>
    <style>
        /* 背景固定效果 */
        body {
            background-attachment: fixed;
        }

        /* 表单容器透明化 */
        .card {
            background-color: rgba(255, 255, 255, 0.7); /* 半透明白色背景 */
            backdrop-filter: blur(8px); /* 毛玻璃模糊效果 */
            border: none; /* 移除边框 */
            border-radius: 1rem; /* 圆角加大 */
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1); /* 柔和阴影 */
        }

        /* 输入框样式优化 */
        .form-floating .form-control {
            background-color: rgba(255, 255, 255, 0.4); /* 半透明输入框 */
            border: 1px solid rgba(255, 255, 255, 0.3); /* 透明边框 */
            border-radius: 0.5rem;
            transition: all 0.3s ease;
        }

        .form-floating .form-control:focus {
            background-color: rgba(255, 255, 255, 0.6); /* 聚焦时背景更清晰 */
            border-color: rgba(72, 181, 66, 0.8); /* 绿色边框 */
            box-shadow: 0 0 0 0.25rem rgba(72, 181, 66, 0.2); /* 聚焦阴影 */
        }

        /* 标签样式 */
        .form-floating label {
            color: #333; /* 深色标签文字 */
            transition: all 0.3s ease;
        }

        /* 按钮样式优化 */
        .btn {
            border-radius: 0.5rem;
            font-weight: 500;
            transition: all 0.3s ease;
            padding: 0.5rem 1rem; /* 调整内边距 */
        }

        .btn-success {
            background-color: rgba(72, 181, 66, 0.9); /* 半透明绿色按钮 */
            border-color: rgba(72, 181, 66, 0.9);
        }

        .btn-success:hover {
            background-color: rgba(72, 181, 66, 1); /* 悬停时不透明 */
            transform: translateY(-2px); /* 微上移效果 */
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        .btn-primary {
            background-color: rgba(11, 102, 242, 0.9); /* 半透明蓝色按钮 */
            border-color: rgba(11, 102, 242, 0.9);
        }

        .btn-primary:hover {
            background-color: rgba(11, 102, 242, 1); /* 悬停时不透明 */
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        /* 复选框样式 */
        .form-check-input {
            background-color: rgba(255, 255, 255, 0.5); /* 半透明复选框 */
            border: 1px solid rgba(150, 150, 150, 0.5);
        }

        .form-check-input:checked {
            background-color: #48b542; /* 选中时绿色 */
            border-color: #48b542;
        }

        /* 标题样式优化 */
        .card-header h3 {
            color: #333; /* 深色标题文字 */
            letter-spacing: 0.5px; /* 字间距 */
        }
    </style>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/js/all.min.js"
            crossorigin="anonymous"></script>
    <script type="text/javascript">
        function checkSubmit(loginForm) {
            if (loginForm.memberAccount.value == '') {
                alert("请输入账号");
                loginForm.memberAccount.focus();
                return false;
            }
            if (loginForm.memberPassword.value == '') {
                alert("请输入密码");
                loginForm.memberPassword.focus();
                return false;
            }
            return true;
        }
    </script>

</head>
<body class="bg-primary" th:style="'background-image: url(/img/会员.png);background-size: 100%, 100%;'">
<div id="layoutAuthentication">
    <div id="layoutAuthentication_content">
        <main>
            <div class="container">
                <div class="row justify-content-center">
                    <div class="col-lg-5">
                        <div class="card shadow-lg border-0 rounded-lg mt-5">
                            <div class="card-header"><h3 class="text-center font-weight-light my-4">
                                欢迎来到L&Z健身房！<br>
                                这里是会员登录</h3></div>
                            <div class="card-body">
                                <form th:action="@{/userLogin}" method="post" name="loginForm"
                                      onsubmit="return checkSubmit(this)">
                                    <div class="form-floating mb-3">
                                        <input class="form-control" id="inputAccount" name="memberAccount" type="account"
                                               placeholder="Account"
                                               onkeypress="return event.keyCode>=48&&event.keyCode<=57"/>
                                        <label for="inputAccount">账号</label>
                                    </div>
                                    <div class="form-floating mb-3">
                                        <input class="form-control" id="inputPassword" name="memberPassword"
                                               type="password"
                                               placeholder="Password"/>
                                        <label for="inputPassword">密码</label>
                                    </div>
                                    <div class="form-check mb-3">
                                        <input class="form-check-input" id="inputRememberPassword" type="checkbox"
                                               value=""/>
                                        <label class="form-check-label" for="inputRememberPassword">记住密码</label>
                                    </div>
                                    <div class="d-flex align-items-center justify-content-between mt-4 mb-0">
                                        <input type="submit" class="btn btn-success" value="登录">
                                        <a class="btn btn-primary" th:href="@{/}">转到管理员登录</a>
                                    </div>
                                </form>
                                <div th:text="${msg}" style="margin-top: 20px;text-align: center;color: red"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
        crossorigin="anonymous"></script>
<script src="/static/js/scripts.js" th:src="@{js/scripts.js}"></script>
</body>
</html>